/*
 * @Descripttion: 出手鸭小程序
 * @version:1.0.1 
 * @Author: HHL
 * @Date: 2022-11-29 18:04:54
 * @LastEditTime: 2025-08-12 11:53:35
 * @LastEditors: sueRimn
 */

import {
  BASEHOST,
} from '../../config'
import Request from '../http'


// 小程序获取手机号注册接口
export const fetchProgramPhone = data => Request.post(`${BASEHOST}/api/login/appletLogin`, data)

// 手机号验证码登录
export const fetchPhoneSmsLogin = data => Request.post(`${BASEHOST}/api/login/smsLogin`, data)

//發送驗證碼
export const fetchSendSms = data => Request.post(`${BASEHOST}/api/login/smsCode`, data)

// 授权用户信息
export const fetchAuthUserInfo = data => Request.postForm(`${BASEHOST}/api/userCenter/authWxUserInfo`, data)


// 获取用户信息
export const fetchUserInfo = () => Request.get(`${BASEHOST}/api/userCenter/user`, {})

// 保存用户信息
export const fetchUserSaveWxUserLocation = data => Request.postForm(`${BASEHOST}/api/userCenter/authWxUserLocation`, data)



// 获取用户openid
export const fetchProgramLogin = data => Request.post(`${BASEHOST}/api/login/code2Session`, data)


export const fetchClerkSign = data => Request.post(`${BASEHOST}/clerk-api/clerk/sign`, data)

// 密码登录
export const passwordLogin = data => Request.post(`${BASEHOST}/api/login/passwordLogin`, data)

// 设置密码
export const setPassword = data => Request.post(`${BASEHOST}/api/userCenter/setPassword`, data)

// 修改密码
export const updatePassword = data => Request.post(`${BASEHOST}/api/userCenter/updatePassword`, data)
